from pyecharts.charts import Bar
from pyecharts import options as opts
from house_data.data_get import data_connect

bar = Bar()
bh = 'SELECT book_name, book_hot FROM boy_hot_range;'
data = data_connect.seach_sql(bh)
print(data)
x=[]
y=[]
for i in data:
    x.append(i[0])
    y.append(i[1])

bar.add_xaxis(x)
bar.add_yaxis("热度(单位：万)",y)
bar.render('../templates/bh_bar.html')



